<!DOCTYPE html>
<html lang="en-us">
  <head>
    <link href="//gmpg.org/xfn/11" rel="profile">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="HandheldFriendly" content="True" />
    <meta http-equiv="content-type" content="text/html; charset=utf-8">

    <!-- Enable responsiveness on mobile devices-->
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">

    <title>{{meta_title}}</title>
    <meta name="description" content="{{meta_description}}" />

    <!-- CSS -->
    <link rel="stylesheet" href="{{asset "css/poole.css"}}">
    <link rel="stylesheet" href="{{asset "css/syntax.css"}}">
    <link rel="stylesheet" href="{{asset "css/lanyon.css"}}">
    <!-- Icons -->
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{asset "apple-touch-icon-precomposed.png"}}">
    <link rel="shortcut icon" href="{{asset "favicon.ico"}}">

    {{! Ghost outputs important style and meta data with this tag }}
    {{ghost_head}}
  </head>

  <body class="layout-reverse sidebar-overlay theme-base-0c">

    {{navigation}}

    <!-- Wrap is the content to shift when toggling the sidebar. We wrap the
         content to avoid any CSS collisions with our real content. -->
    <div class="wrap">
      <div class="masthead">
        <div class="container">
          <h3 class="masthead-title">
            <a href="{{@blog.url}}" title="Home">{{@blog.title}}</a>
            <small>{{@blog.description}}</small>
          </h3>
        </div>
      </div>

      <div class="container content">
        {{{body}}}
      </div>
    </div>

    {{#if @blog.navigation}}
      <label for="sidebar-checkbox" class="sidebar-toggle"></label>
    {{/if}}

    {{#if @blog.navigation}}
      <script>
        (function(document) {
          var toggle = document.querySelector('.sidebar-toggle');
          var sidebar = document.querySelector('#sidebar');
          var checkbox = document.querySelector('#sidebar-checkbox');
          var trigger = 'ontouchstart' in document ? 'touchstart' : 'click';

          document.addEventListener(trigger, function(e) {
            var target = e.target;

            if(!checkbox.checked ||
               sidebar.contains(target) ||
               (target === checkbox || target === toggle)) return;

            checkbox.checked = false;
          }, false);
        })(document);
      </script>
      <script type="text/javascript">
  var duoshuoQuery = {short_name:"yjk"};
    (function() {
      var ds = document.createElement('script');
      ds.type = 'text/javascript';ds.async = true;
      ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
      ds.charset = 'UTF-8';
      (document.getElementsByTagName('head')[0]
       || document.getElementsByTagName('body')[0]).appendChild(ds);
    })();
    </script>
    {{/if}}

    {{! Ghost outputs important scripts and data with this tag }}
    {{ghost_foot}}
  </body>
</html>
